package com.huaxin.device.models;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.huaxin.hxenum.enums.FireRating;
import com.huaxin.hxenum.enums.VentilationType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 配电房信息表
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("electrical_room")
@Schema(description = "配电房")
public class ElectricalRoom extends BaseModel {

    @TableField(value = "room_name")
    @Schema(description = "配电房名称", example = "1#楼地下一层配电室")
    private String roomName;

    @TableField(value = "room_code")
    @Schema(description = "编号（唯一）", example = "RM-01")
    private String roomCode;

    @TableField(value = "location")
    @Schema(description = "详细位置", example = "1号楼B1层东侧")
    private String location;

    @TableField(value = "floor")
    @Schema(description = "所在楼层", example = "B1")
    private String floor;

    @TableField(value = "area")
    @Schema(description = "面积（㎡）", example = "50.00")
    private BigDecimal area;

    @TableField(value = "construction_year")
    @Schema(description = "建造年份", example = "2018")
    private Integer constructionYear; // YEAR 类型可用 Integer 表示

    @TableField(value = "fire_rating")
    @Schema(description = "防火等级", example = "1")
    private FireRating fireRating;

    @TableField(value = "ventilation_type")
    @Schema(description = "通风类型", example = "natural")
    private VentilationType ventilationType;

    @TableField(value = "description")
    @Schema(description = "备注")
    private String description;

    @TableField(value = "family_id")
    @Schema(description = "家庭ID", example = "family-01")
    private String familyId;
}